//
//  extensionButton.swift
//  晓庄微博
//
//  Created by Maxwell on 10/22/18.
//  Copyright © 2018 Maxwell. All rights reserved.
//

import Foundation
import UIKit

extension UIButton{
    convenience init(imageName:String,backgroundImageName:String){
        self.init()
        setImage(UIImage(named: imageName), for: .normal)
        setImage(UIImage(named: imageName + "_highlighted"), for: .highlighted)
        setBackgroundImage(UIImage(named: backgroundImageName), for: .normal)
        setBackgroundImage(UIImage(named: backgroundImageName + "_highlighted"), for: .selected)
        sizeToFit()
    }
}
